angular.module('faApp')
  .service('simuService', [ 'ajaxService',function (ajaxService) {

    this.list = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("SIMU_LIST"),cfg || {});
    };  
    
    this.add = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("SIMU_ADD"),cfg || {});
    };  

    this.edit = function (cfg) {
      return ajaxService.post(ajaxService.getApiUri("SIMU_EDIT"),cfg || {});
    };  

    this.query = function (cfg) {
      return ajaxService.jsonp(ajaxService.getApiUri("SIMU_QUERY"),cfg);
    };  

    this.remove = function (cfg) {
      return ajaxService.jsonp(ajaxService.getApiUri("SIMU_REMOVE"),cfg || {});
    };  

    this.stop = function (cfg) {
      cfg.pubStatus = '0';
      return ajaxService.jsonp(ajaxService.getApiUri("SIMU_EDIT"),cfg);
    };  

    this.start = function (cfg) {
      cfg.pubStatus = '1';
      return ajaxService.jsonp(ajaxService.getApiUri("SIMU_EDIT"),cfg);
    };  

    this.queryjjbm = function (cfg) {
      return ajaxService.jsonp(ajaxService.getApiUri("SIMU_QUERY_FUNDCODE"),cfg);
    };  

    this.productRecommend = function (product) {
      return ajaxService.post(ajaxService.getApiUri("PRODUCT_RECOMMEND"),product || {});
    };

}]);
 




